import request from '@/utils/request.js'
import { getStorage } from '@/utils/storage.js'
// 登录 - 登录接口
export const loginAPI = ({
  mobile,
  code
}) => request({
  url: '/v1_0/authorizations',
  method: 'POST',
  data: {
    mobile,
    code
  }
})

// 登录 - 刷新token
export const refreshTokenAPI = () => request({
  url: '/v1_0/authorizations',
  method: 'PUT',
  headers: {
    Authorization: 'Bearer ' + getStorage('refresh_token')
  }

})
